<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/tld/pageutil.tld" prefix="pu"%>
<%@taglib uri="/WEB-INF/tld/pageable.tld" prefix="pageable"%>
<%@taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c-rt"%>
<%@taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt-rt"%>
${pu:reqSet('currentDate', pu:currentDate()) }
<c-rt:if test="${empty param.startDate}">
<c-rt:set var="startDate" scope="request">
<fmt-rt:formatDate value="${currentDate}" pattern="yyyy-MM-dd"/>
</c-rt:set>
</c-rt:if>
<c-rt:if test="${!empty param.startDate}">
${pu:reqSet('startDate', param.startDate) }
</c-rt:if>
<c-rt:if test="${empty param.endDate}">
<c-rt:set var="endDate" scope="request">
<fmt-rt:formatDate value="${currentDate}" pattern="yyyy-MM-dd"/>
</c-rt:set>
</c-rt:if>
<c-rt:if test="${!empty param.endDate}">
${pu:reqSet('endDate', param.endDate) }
</c-rt:if>
<style>
<!--
.tb-2{border:1px solid #ccc; width:100%; vertical-align:text-bottom;}
.tb-2 th{background:#ffe9b5; color:#631;text-align:center; font-weight:bold; font-size:13px; padding:.25em;*padding:.35em .2em .15em;vertical-align:middle}
.tb-2 td{padding:6px 5px;*padding:6px 5px 4px;text-align:center;}

.tb-2 td {
text-align:left;
}
.tb-2 tr:hover{background:#fffae5;}
-->
</style>

<c-rt:set var="hqlUser" value="from User where group.code like ?"/>
<c-rt:set var="pvsUser" value="${pu:addToList('parasUser', 'C%')}"/>
<c-rt:set var="users" value="${pu:queryByHql(hqlUser, pvsUser, null)}"/>
${pu:reqSet('menu', pu:get('com.yaodian100.core.menu.entity.Menu', 'WorkOrder.status')) }
<br />
<h1>工单报表
</h1>
<%--
${pu:reqSet('q', pu:get('com.yaodian100.crm.cs.entity.Question', '8a8080c72741d923012741e33fb80002')) }
<c-rt:forEach items="${q.answers }" var="a">
${a.id }<br/>
</c-rt:forEach>
--%>
<form name="theForm" method="post" action="/ecadmin/workOrder/workOrderReport.do">
<input type="hidden" name="responser" value="${param.responser}"/>
<input type="hidden" name="iamlazy" id="iamlazy" value="list"/>
<table>

<tr>
<td>
日期区间(yyyy-MM-dd)：
<input type="text" name="startDate" id="startDate" value="${startDate }"/>
~
<input type="text" name="endDate" id="endDate" value="${endDate }"/>
</td>
</tr>
<tr>
<td>
<script>
$(function(){
	doAR('/ecadmin/cs/page.do?iamlazy=cqTypeList&class1=${param.class1}', 'class1Zone');
	doAR('/ecadmin/cs/page.do?iamlazy=subTypeList&class2=${param.class2}&parentId=${param.class1}', 'class2Zone');
	doAR('/ecadmin/cs/page.do?iamlazy=level3List&commonQuestionType=${param.commonQuestionType}&parentId=${param.class2}', 'commonQuestionTypeZone');
});
</script>
<table><tr><td>
问题大类：</td><td><div id="class1Zone"></div></td><td>
问题中类：</td><td><div id="class2Zone"></div></td><td>
问题小类：</td><td><div id="commonQuestionTypeZone"></div>
</td></tr></table>
</td>
</tr>
<tr>
<td>
处理等级：<select name="priority">
<option value="">请选择</option>
<option value="0" <c-rt:if test="${param.priority == '0'}">selected="selected"</c-rt:if>>函件</option>
<option value="1" <c-rt:if test="${param.priority == '1'}">selected="selected"</c-rt:if>>一般件</option>
<option value="2" <c-rt:if test="${param.priority == '2'}">selected="selected"</c-rt:if>>急件</option>
<option value="3" <c-rt:if test="${param.priority == '3'}">selected="selected"</c-rt:if>>特急件</option>
</select>
状态：
<select name="status">
<option value="">请选择</option>
<c-rt:forEach items="${menu.options}" var="option">
<option value="${option.value.code }" <c-rt:if test="${option.value.code==param.status }">selected="selected"</c-rt:if>>${option.value.name }</option>
</c-rt:forEach>
</select>
审核状态：
<select name="approveStatus">
<option value="">请选择</option>
<option value="0" <c-rt:if test="${param.approveStatus=='0' }">selected="selected"</c-rt:if>>待审核</option>
<option value="1" <c-rt:if test="${param.approveStatus=='1' }">selected="selected"</c-rt:if>>已核可</option>
<option value="2" <c-rt:if test="${param.approveStatus=='2' }">selected="selected"</c-rt:if>>已注销</option>

</select>
问题类型：
<select name="questionType">
<option value="">请选择</option>
<option value="CommonQuestion" <c-rt:if test="${param.questionType=='CommonQuestion' }">selected="selected"</c-rt:if>>客服问答</option>
<option value="CommonQuestion_product" <c-rt:if test="${param.questionType=='CommonQuestion_product' }">selected="selected"</c-rt:if>>商品问答</option>
<option value="PayByProductArrive" <c-rt:if test="${param.questionType=='PayByProductArrive' }">selected="selected"</c-rt:if>>货到付款审核</option>
<option value="ReturnProductApply" <c-rt:if test="${param.questionType=='ReturnProductApply' }">selected="selected"</c-rt:if>>退货申请</option>
<option value="ChangeProductException" <c-rt:if test="${param.questionType=='ChangeProductException' }">selected="selected"</c-rt:if>>换货单（异常）</option>
<option value="ReturnProductException" <c-rt:if test="${param.questionType=='ReturnProductException' }">selected="selected"</c-rt:if>>退货单（异常）</option>
<option value="OutOfStock" <c-rt:if test="${param.questionType=='OutOfStock' }">selected="selected"</c-rt:if>>断／缺货</option>

</select>
</td>
<td></td>
</tr>
<tr>
<td>
${pu:reqSet('taskGroups', pu:queryByHql('from TaskGroup order by id asc', null, null)) }
处理分组：<select name="taskGroupId" onchange="doAR('/ecadmin/cs/taskGroup/page.do?iamlazy=taskGroupUsers&taskGroupId='+this.value+'&columnName=createUser', 'createUser')">
<option value="">请选择</option>
<c-rt:forEach items="${taskGroups }" var="taskGroup">
<option value="${taskGroup.id }" <c-rt:if test="${taskGroup.id==param.taskGroupId }">selected="selected"</c-rt:if>>${taskGroup.name }</option>
</c-rt:forEach>
</select>
</td>
</tr>
<tr>
<td>报表类型：<input type="radio" name="reportType" value="summary" <c-rt:if test="${empty param.reportType || param.reportType=='summary' }">checked="checked"</c-rt:if>/>统计报表<input type="radio" name="reportType" value="KPI" <c-rt:if test="${param.reportType=='KPI' }">checked="checked"</c-rt:if>/>KPI
<input type="radio" name="reportType" value="detail" <c-rt:if test="${param.reportType=='detail' }">checked="checked"</c-rt:if>/>工单明细表
</td>
</tr>
<tr>
<td><input type="button" id="searchWorkOrder" value="查询"/></td>
<td></td>
</tr>
</table>
<script type="text/javascript" charset="UTF-8" src="/ecadmin/js/jquery.datepick.js"></script>
<script type="text/javascript" charset="UTF-8" src="/ecadmin/js/jquery.datepick-zh-CN.js"></script>
<link rel="stylesheet" type="text/css" href="/ecadmin/css/smoothness.datepick.css" />
<script>
$(function(){
	$('#searchWorkOrder').click(function(){
		error="";
		
		if(document.theForm.startDate.value==''){
			error+="请填开始时间\r\n";
		}
		if(document.theForm.endDate.value==''){
			error+="请填结束时间\r\n";
		}
		if(document.theForm.startDate.value!='' && !isValidDate(document.theForm.startDate.value)){
			error+=('开始时间格式错误\r\n');
			
		}else if(document.theForm.endDate.value!='' && !isValidDate(document.theForm.endDate.value)){
			error+=('结束时间格式错误！\r\n');
			
		}
		if(isValidDate(document.theForm.startDate.value)&& isValidDate(document.theForm.endDate.value)){
			if(compareDate(document.theForm.endDate.value, document.theForm.startDate.value, '-')>=90){
				error+="日期相距必须为90日内\r\n";
			}
		}
		if(error!=""){
			alert(error);
		}else{
		document.theForm.action="/ecadmin/workOrder/workOrderReport.do";
		document.theForm.submit();
		}
	});
	$('#exportCsv').click(function(){
		document.theForm.action="/ecadmin/workOrder/downloadWorkOrderDetail.do";
		document.theForm.submit();
	});
	$('#startDate').datepick({dateFormat:'yy-mm-dd'});
	$('#endDate').datepick({dateFormat:'yy-mm-dd'});
});
function isValidDate(str){

	var expr = /^([1-2]{1,1}[0-9]{3,3})-([0-1]{1,1}[0-9]{1,1})-([0-3]{1,1}[0-9]{1,1})$/;
	if(!expr.test(str)){
	   return false;
	}
	var strs=str.split("-");
	if(strs.length!=3){
	   return false;
	}

	var date= new Date(parseFloat(strs[0]),parseFloat(strs[1])-1,parseFloat(strs[2]));
	if(date.getFullYear()==parseFloat(strs[0])&&(date.getMonth()+1==parseFloat(strs[1]))&&date.getDate()==parseFloat(strs[2])){
	   return date;
	}
	return false;
	}
function compareDate(first,second,sign)
{
fArray = first.split(sign);
sArray = second.split(sign);
var fDate = new Date(fArray[0],fArray[1],fArray[2]);
var sDate = new Date(sArray[0],sArray[1],sArray[2]);

var t = Math.abs(fDate.getTime()-sDate.getTime());
var days = t/(1000*60*60*24);
return days;
}
</script>
</form>
<c-rt:if test="${!empty valueMap || !empty workOrders}">
	<c-rt:choose>
		<c-rt:when test="${param.reportType=='summary'}">
			日期:${param.startDate }~${param.endDate } <a href="/ecadmin/workOrder/downloadWorkOrderDetail.do?reportType=summary&responseGroup=${param.taskGroupId }&startDate=${param.startDate}&endDate=${param.endDate}&class1=${param.class1}&class2=${param.class2}&commonQuestionType=${param.commonQuestionType}&priority=${param.priority}&approveStatus=${param.approveStatus}&questionType=${param.questionType}">汇出所有明细</a>
			<table class="tb-2">
			<c-rt:forEach items="${valueMap }" var="values">
			<c-rt:if test="${empty param.taskGroupId}">
				${pu:reqSet('valueKey', pu:get('com.yaodian100.crm.workorder.entity.TaskGroup', values.key).name) }
				
			</c-rt:if>
			<c-rt:if test="${!empty param.taskGroupId}">
				${pu:reqSet('valueKey', values.key) }
			</c-rt:if>
				<tr><td>
				${valueKey }</td><td>已结案：
				<c-rt:if test="${values.value[1]>0}"><a href="/ecadmin/workOrder/workOrderReport.do?status=2&taskGroupId=${!empty param.taskGroupId?param.taskGroupId:values.key }&responser=${!empty param.taskGroupId?values.key:''}&startDate=${param.startDate}&endDate=${param.endDate}&reportType=detail">${values.value[1] }</a></c-rt:if>
				<c-rt:if test="${values.value[1]==0}">${values.value[1]}</c-rt:if>
				</td><td> 未回复：
				<c-rt:if test="${values.value[0]>0}"><a href="/ecadmin/workOrder/workOrderReport.do?status=0&taskGroupId=${!empty param.taskGroupId?param.taskGroupId:values.key }&responser=${!empty param.taskGroupId?values.key:''}&startDate=${param.startDate}&endDate=${param.endDate}&reportType=detail">${values.value[0] }</a></c-rt:if>
				<c-rt:if test="${values.value[0]==0}">${values.value[0]}</c-rt:if>
				</td><td> <a href="/ecadmin/workOrder/downloadWorkOrderDetail.do?reportType=summary&responseGroup=${!empty param.taskGroupId?param.taskGroupId:values.key }&responser=${!empty param.taskGroupId?values.key:''}&startDate=${param.startDate}&endDate=${param.endDate}&class1=${param.class1}&class2=${param.class2}&commonQuestionType=${param.commonQuestionType}&priority=${param.priority}&approveStatus=${param.approveStatus}&questionType=${param.questionType}">汇出${valueKey }全部</a></td>
				</tr>
			</c-rt:forEach>
			</table>
		</c-rt:when>
		<c-rt:when test="${param.reportType=='KPI'}">
		<c-rt:forEach items="${valueMap}" var="values">
		<c-rt:if test="${empty param.taskGroupId}">
				${pu:reqSet('valueKey', pu:get('com.yaodian100.crm.workorder.entity.TaskGroup', values.key).name) }
				
			</c-rt:if>
			<c-rt:if test="${!empty param.taskGroupId}">
				${pu:reqSet('valueKey', values.key) }
			</c-rt:if>
			${valueKey }

		${pu:reqSet('totalValue', values.value[6]['COUNT_']+values.value[7]['COUNT_']+values.value[8]['COUNT_']+values.value[9]['COUNT_']+values.value[10]['COUNT_']+values.value[11]['COUNT_']) }
		
		<table class="tb-2" >
		<tr>
		<td></td><td>结案日1天内</td><td>结案日1～2天</td><td>结案日2～3天</td><td>结案日3～4天</td><td>结案日4~5天</td><td>结案日超过5天</td><td>统计</td>
		</tr>
		<tr>
		<th>件数</th><td>${values.value[6]['COUNT_'] }</td><td>${values.value[7]['COUNT_'] }</td><td>${values.value[8]['COUNT_'] }</td><td>${values.value[9]['COUNT_']}</td><td>${values.value[10]['COUNT_']}</td><td>${values.value[11]['COUNT_']}</td><td>${totalValue}</td>
		</tr>
		<tr>
		<th>%</th><td>${totalValue==0?0:values.value[6]['COUNT_']/totalValue *100 }%</td><td>${totalValue==0?0:values.value[7]['COUNT_']/totalValue *100 }%</td><td>${totalValue==0?0:values.value[8]['COUNT_']/totalValue *100 }%</td><td>${totalValue==0?0:values.value[9]['COUNT_']/totalValue *100 }%</td><td>${totalValue==0?0:values.value[10]['COUNT_']/totalValue *100 }%</td><td>${totalValue==0?0:values.value[11]['COUNT_']/totalValue *100 }%</td><td></td>
		</tr>
		</table>

		<br/>
		</c-rt:forEach>
		</c-rt:when>
		<c-rt:when test="${param.reportType=='detail'}">
		<input type="button" value="汇出CSV" id="exportCsv"/>
		<div style="float:left;width:100%;overflow:auto">
			<table class="tb-2">
			<tr>
			<th>问题单编号</th>
			<th>工单编号</th>
			<th>前单编号</th>
			<th>订单编号</th>
			<th>会员编号</th>
			<th>问题单状态</th>
			<th>问题单建立日期</th>
			<th>回覆内容</th>
			<th>问题大</th>
			<th>问题中</th>
			<th>问题小</th>
			<th>前单说明</th>
			<th>问题类型</th>
			<th>处理等级</th>
			<th>工单状态</th>
			<th>工单建立人</th>
			<th>工单建立群组</th>
			<th>工单建立时间</th>
			<th>处理人</th>
			<th>处理群组</th>
			<th>处理时间</th>
			<th>转单回覆时间</th>
			<th>审核状态</th>
			<th>审核人</th>
			<th>审核群组</th>
			<th>审核时间</th>
			<th>是否逾期</th>
			<th>结案KPI小时</th>
			<th>KPI小时</th>
			</tr>
				<c-rt:forEach items="${workOrders}" var="wo">
					<tr>
					<td>${wo.domainId }</td>
					<td>${wo.id }</td>
					<td>${wo.parent.id }</td>
					<td>${wo.question.extraValue['orderId'].value }</td>
					<td>${wo.question.memberId }</td>
					<td>${pu:menuOption('Question.status', pu:toString(wo.question.status)).name}</td>
					<td><fmt-rt:formatDate value="${wo.question.createDate }" pattern="yyyy-MM-dd HH:mm"/></td>
					<td>${wo.note }</td>
					<td>
					<c-rt:if test="${!empty wo.question.extraValue['class1'].value}">
						${pu:get('com.yaodian100.crm.cs.entity.CommonQuestionType', wo.question.extraValue['class1'].value).name }
					</c-rt:if>
					</td>
					<td>
					<c-rt:if test="${!empty wo.question.extraValue['class2'].value}">
						${pu:get('com.yaodian100.crm.cs.entity.CommonQuestionType', wo.question.extraValue['class2'].value).name }
					</c-rt:if>
					</td>
					<td>
					<c-rt:if test="${!empty wo.question.extraValue['commonQuestionType'].value}">
						${pu:get('com.yaodian100.crm.cs.entity.CommonQuestionType', wo.question.extraValue['commonQuestionType'].value).name }
					</c-rt:if>
					</td>
					<td>${wo.comment }</td>
					<td>
					<c-rt:if test="${wo.question.type.name=='CommonQuestion'}">
					<c-rt:choose>
					<c-rt:when test="${wo.question.type.name=='CommonQuestion' and wo.question.extraValue['isProductQAA'].value=='true'}">
						商品问答
					</c-rt:when>
					<c-rt:otherwise>
						客服问答
					</c-rt:otherwise>
					</c-rt:choose>
					</c-rt:if>
					<c-rt:if test="${wo.question.type.name!='CommonQuestion'}">
					${wo.question.type.description }
					</c-rt:if>
					</td>
					<td>
					<c-rt:if test="${wo.priority==0}">
					函件
					</c-rt:if>
					<c-rt:if test="${wo.priority==1}">
					一般件
					</c-rt:if>
					<c-rt:if test="${wo.priority==2}">
					急件
					</c-rt:if>
					<c-rt:if test="${wo.priority==3}">
					特急件
					</c-rt:if>
					</td>
					<td>
					${pu:menuOption('WorkOrder.status', pu:toString(wo.status)).name }
					</td>
					<td>${wo.createUser }</td>
					<td>
					${pu:reqSet('paramUser', null)}
					${pu:listAdd('paramUser', wo.createUser)}
					${pu:reqSet('taskGroupUsers', pu:queryByHql('from TaskGroupUser where user.username=?', pu:arrayGet('paramUser'), null)) }
					${taskGroupUsers[0].taskGroup.name }
					</td>
					<td>
					<fmt-rt:formatDate value="${wo.createDate }" pattern="yyyy-MM-dd HH:mm"/>
					</td>
					<td>${wo.owner.username }</td>
					<td>${wo.responseGroup }</td>
					<td><fmt-rt:formatDate value="${wo.startTime }" pattern="yyyy-MM-dd HH:mm"/></td>
					<td>
					${pu:reqSet('replyHql', 'from WorkOrder where parent.id=?') }
					${pu:reqSet('replyList', null) }
					${pu:listAdd('replyList', wo.id) }
					${pu:reqSet('replyWorkOrder', pu:queryByHql(replyHql, pu:arrayGet('replyList'), null)) }
					
					<c-rt:if test="${!empty replyWorkOrder}">
					<c-rt:if test="${!empty replyWorkOrder[0].finishTime}">
					<fmt-rt:formatDate value="${replyWorkOrder[0].finishTime}" pattern="yyyy-MM-dd HH:mm"/>
					</c-rt:if>
					<c-rt:if test="${empty replyWorkOrder[0].finishTime}">
					<b>尚未回覆</b>
					</c-rt:if>
					</c-rt:if>
					<c-rt:if test="${empty replyWorkOrder}">
					未转单
					</c-rt:if>
					</td>
					<td>
					<c-rt:if test="${wo.approveStatus==0 }">
					待审核
					</c-rt:if>
					<c-rt:if test="${wo.approveStatus==1 }">
					已核可
					</c-rt:if>
					<c-rt:if test="${wo.approveStatus==2 }">
					已注销
					</c-rt:if>
					</td>
					<td>${wo.approver }</td>
					<td>
					<c-rt:if test="${!empty wo.approveGroup}">
					${pu:get('com.yaodian100.crm.workorder.entity.TaskGroup', wo.approveGroup).name }(${wo.approveGroup })
					</c-rt:if>
					</td>
					<td><fmt-rt:formatDate value="${wo.approveTime }" pattern="yyyy-MM-dd HH:mm"/></td>
					<td>
				<c-rt:if test="${wo.status==2}">
					<c-rt:if test="${empty wo.priority or wo.priority==0}">
						<c-rt:choose>
						<c-rt:when test="${!empty wo.startTime and !empty wo.finishTime}">
							<c-rt:choose>
								<c-rt:when test="${pu:subDateInHour(wo.finishTime, wo.startTime)>60}">
									是
								</c-rt:when>
								<c-rt:otherwise>
									否
								</c-rt:otherwise>
							</c-rt:choose>
						</c-rt:when>
						<c-rt:otherwise>
						否
						</c-rt:otherwise>
						</c-rt:choose>
					</c-rt:if>
				 <c-rt:if test="${wo.priority==1}">
						<c-rt:choose>
						<c-rt:when test="${!empty wo.startTime and !empty wo.finishTime}">
							<c-rt:choose>
								<c-rt:when test="${pu:subDateInHour(wo.finishTime, wo.startTime)>48}">
									是
								</c-rt:when>
								<c-rt:otherwise>
									否
								</c-rt:otherwise>
							</c-rt:choose>
						</c-rt:when>
						<c-rt:otherwise>
						否
						</c-rt:otherwise>
						</c-rt:choose>
					</c-rt:if>
				<c-rt:if test="${wo.priority==2}">
						<c-rt:choose>
						<c-rt:when test="${!empty wo.startTime and !empty wo.finishTime}">
							<c-rt:choose>
								<c-rt:when test="${pu:subDateInHour(wo.finishTime, wo.startTime)>36}">
									是
								</c-rt:when>
								<c-rt:otherwise>
									否
								</c-rt:otherwise>
							</c-rt:choose>
						</c-rt:when>
						<c-rt:otherwise>
						否
						</c-rt:otherwise>
						</c-rt:choose>
					</c-rt:if>
				<c-rt:if test="${wo.priority==3}">
						<c-rt:choose>
						<c-rt:when test="${!empty wo.startTime and !empty wo.finishTime}">
							<c-rt:choose>
								<c-rt:when test="${pu:subDateInHour(wo.finishTime, wo.startTime)>24}">
									是
								</c-rt:when>
								<c-rt:otherwise>
									否
								</c-rt:otherwise>
							</c-rt:choose>
						</c-rt:when>
						<c-rt:otherwise>
						否
						</c-rt:otherwise>
						</c-rt:choose>
					</c-rt:if>
			</c-rt:if>
			<c-rt:if test="${wo.status!=2}">
			${pu:reqSet('currentDate', pu:currentDate()) }
				<c-rt:if test="${!empty wo.startTime}">
					<c-rt:if test="${empty wo.priority or wo.priority==0}">
						<c-rt:choose>
						<c-rt:when test="${pu:subDateInHour(currentDate, wo.startTime)>60}">
						是
						</c-rt:when>
						<c-rt:otherwise>
						否
						</c-rt:otherwise>
						</c-rt:choose>
					</c-rt:if>
					<c-rt:if test="${wo.priority==1}">
						<c-rt:choose>
						<c-rt:when test="${pu:subDateInHour(currentDate, wo.startTime)>48}">
						是
						</c-rt:when>
						<c-rt:otherwise>
						否
						</c-rt:otherwise>
						</c-rt:choose>
					</c-rt:if>
					<c-rt:if test="${wo.priority==2}">
						<c-rt:choose>
						<c-rt:when test="${pu:subDateInHour(currentDate, wo.startTime)>36}">
						是
						</c-rt:when>
						<c-rt:otherwise>
						否
						</c-rt:otherwise>
						</c-rt:choose>
					</c-rt:if>
					<c-rt:if test="${wo.priority==3}">
						<c-rt:choose>
						<c-rt:when test="${pu:subDateInHour(currentDate, wo.startTime)>24}">
						是
						</c-rt:when>
						<c-rt:otherwise>
						否
						</c-rt:otherwise>
						</c-rt:choose>
					</c-rt:if>
				</c-rt:if>
				<c-rt:if test="${empty wo.startTime}">
				否
				</c-rt:if>
				
			</c-rt:if>
					</td>
					<td>
					<c-rt:if test="${!empty wo.startTime and !empty wo.finishTime}">
					${pu:subDateInHour(wo.finishTime, wo.startTime) }
					</c-rt:if>
					</td>
					<td>
					<c-rt:if test="${empty wo.priority || wo.priority==0}">
					60
					</c-rt:if>
					<c-rt:if test="${wo.priority==1}">
					48
					</c-rt:if>
					<c-rt:if test="${wo.priority==2}">
					36
					</c-rt:if>
					<c-rt:if test="${wo.priority==3}">
					24
					</c-rt:if>
					</td>
					</tr>
				</c-rt:forEach>
			</table>
			</div>
			<pageable:Pageable url="/ecadmin/workOrder/workOrderReport.do" formname="woForm" key="detail"></pageable:Pageable>
			<table width="100%">
<tr>
<td align="right">
${pu:reqSet('currentPage', param.detail_pageable_currentPage) }
<c-rt:if test="${empty param.detail_pageable_currentPage}">
${pu:reqSet('currentPage', 1) }
</c-rt:if>
目前在第${currentPage }页, 资料共${tp.totalRecords }笔</td>
</tr>
</table>


		</c-rt:when>
	</c-rt:choose>
	
</c-rt:if>
